import request from '@/utils/request'

export function fetchMarketServiceIntegrationList(data) {
  return request({
    url: '/system/marketservice/MarketServiceIntegrationTask/list',
    method: 'post',
    data
  })
}

export function getMarketServiceIntegration(id) {
  return request({
    url: '/system/marketservice/MarketServiceIntegrationTask/detail/' + id,
    method: 'get'
  })
}

export function createMarketServiceIntegration(data) {
  return request({
    url: '/system/marketservice/MarketServiceIntegrationTask/add',
    method: 'post',
    data
  })
}

export function updateMarketServiceIntegration(data) {
  return request({
    url: '/system/marketservice/MarketServiceIntegrationTask/update',
    method: 'post',
    data
  })
}

export function deleteMarketServiceIntegration(ids) {
  return request({
    url: '/system/marketservice/MarketServiceIntegrationTask/delete',
    method: 'post',
    data: { ids }
  })
}

export function exportMarketServiceIntegration(data) {
  return request({
    url: '/system/marketservice/MarketServiceIntegrationTask/export',
    method: 'post',
    data
  })
}
export function runJobNow(data) {
  return request({
    url: '/system/marketservice/MarketServiceIntegrationTask/runJobNow' ,
    method: 'post',
    data
  })
}
